package com.yunsc.product.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yunsc.common.serializer.TimestampToDateSerializer;
import com.yunsc.media.entity.YunscUploadFileEntity;
import lombok.Data;

import java.io.Serializable;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-04-16 20:37
 */
@Data
public class GoodsSkuDTO implements Serializable {

    private Integer id;
    @JsonProperty("goods_sku_id")
    private String goodsSkuId;
    @JsonProperty("goods_id")
    private Integer goodsId;
    @JsonProperty("image_id")
    private Integer imageId;
    @JsonProperty("goods_sku_no")
    private String goodsSkuNo;
    @JsonProperty("goods_price")
    private String goodsPrice;
    @JsonProperty("line_price")
    private String linePrice;
    @JsonProperty("stock_num")
    private Integer stockNum;
    @JsonProperty("goods_weight")
    private Double goodsWeight;
    @JsonProperty("goods_props")
    private Object goodsProps;

    @JsonProperty("spec_value_ids")
    private Object specValueIds;
    @JsonProperty("store_id")
    private Integer storeId;

    @JsonProperty("create_time")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer createTime;

    @JsonProperty("update_time")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer updateTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YunscUploadFileEntity image;

    private String imageUrl;
}
